{% extends "analysis_plugins/general_information.html" %}

{% block analysis_result_details %}

    <tr>
        <td>String count</td>
        <td>{{ analysis_result['strings'] | length }}</td>
    </tr>
    <tr>
        <td rowspan="4">Strings</td>
        <td data-toggle="collapse" class="clickable" data-target="#collapse-strings">
            <span class="fas fa-angle-down"></span> In alphabetical order
        </td>
    </tr>
    <tr>
        <td class="p-0">
            <div class="collapse" id="collapse-strings" style="width: 100%">
                <pre class="p-2 bg-light mb-0" style="white-space: pre-wrap;">{{ analysis_result['strings'] | list_to_line_break_string }}</pre>
            </div>
        </td>
    </tr>
    {% if 'offsets' in analysis_result %}  <!-- backwards compatibility -->
        <tr>
            <td data-toggle="collapse" class="clickable" data-target="#collapse-offset">
                <span class="fas fa-angle-down"></span> Ordered by offset
            </td>
        </tr>
        <tr>
            <td class="p-0">
                <div class="collapse" id="collapse-offset" style="width: 100%">
                {% if 'offsets' in analysis_result %}
                    <pre class="p-2 bg-light mb-0" style="white-space: pre-wrap;">{{ analysis_result['offsets'] | format_string_list_with_offset }}</pre>
                {% else %}
                    <pre>None</pre>
                {% endif %}
                </div>
            </td>
        </tr>
    {% endif %}

{% endblock %}
